package cn.xyhelp.shop.user.controller;


import cn.xyhelp.shop.user.model.entity.User;
import cn.xyhelp.shop.user.service.UserService;
import cn.xyhelp.shop.user.support.ResponsePack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/web")
@Api("用户管理")
@ResponsePack
public class login {
    @GetMapping("login")
    public Map<String, String> hello()
    {
        Map<String, String> mp=new HashMap<>();
        mp.put("key","value");
        return mp;
    }

    @Autowired
    UserService userService;
    @PostMapping("addUser")
    public Boolean addUser(@RequestBody User u)
    {
        return userService.teatAddUser(u);
    }
}
